package com.sunny.ihealth;

import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import android.support.annotation.Nullable;

import com.sunny.ihealth.data.BmobManager;
import com.sunny.ihealth.data.PreferencesHelper;
import com.sunny.ihealth.data.im.IMMessageHandler;

import cn.bmob.newim.BmobIM;

/**
 * 基础的Service
 * Created by Sunny  An on 2016/6/5.
 */
public class BaseService extends Service {

    private BaseApplication application;

    @Override
    public void onCreate() {
        super.onCreate();
        application = (BaseApplication) getApplication();
    }

    @Nullable
    @Override
    public IBinder onBind(Intent intent) {
        return null;
    }

    public BaseApplication getBaseApp() {
        return application;
    }


    public BmobManager getBmob() {
        return application.getBmob();
    }

    public PreferencesHelper getPreferencesHelper() {
        return application.getPreferencesHelper();
    }

    public String getCurrentUser() {
        return application.getCurrentUser();
    }

    public IMMessageHandler getImMessageHandler() {
        return application.getImMessageHandler();
    }
}
